#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define endl '\n'
const int N = 2005;

int n, m;
string expr1[2005], expr2[2005];

string dfs1(int n);
string dfs2(int n);
string dfs(int n, int t = 0) {
  string x = dfs1(n);
  string y = dfs2(n);
  if (t == 1) {
    x = '(' + x;
    x += ')';
  }
  if (x.size() < y.size())
    return x;
  else
    return y;
}
void chmn(string& ans, string& now) {
  if (ans.empty() || ans.size() > now.size()) ans = now;
}
string dfs1(int n) {
  // n = x + y
  if (n == 1) return "1";
  if (expr1[n].size()) return expr1[n];
  string& ans = expr1[n];
  rep(x, 1, n / 2) {
    int y = n - x;
    string now = dfs(x, 0) + '+' + dfs(y, 0);
    chmn(ans, now);
  }
  // cout << "dfs 1 " << n << ' ' << ans << endl;
  return ans;
}
string dfs2(int n) {
  if (n == 1) return "1";
  if (expr2[n].size()) return expr2[n];
  string& ans = expr2[n];
  for (int x = 2; x * x <= n; x++) {
    if (n % x) continue;
    int y = n / x;
    string now = dfs(x, 1) + '*' + dfs(y, 1);
    chmn(ans, now);
  }
  if (ans.empty()) {
    ans = dfs1(n) + ')';
    ans = '(' + ans;
  }
  // cout << "dfs 2 " << n << ' ' << ans << endl;
  return ans;
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  expr1[11] = expr2[11] = "11";
  expr1[111] = expr2[111] = "111";
  expr1[1111] = expr2[1111] = "1111";
  cin >> n;
  cout << dfs(n, 0);
  return 0;
}